Judge orders competency hearing for Nathaniel Castellanos