"a competency hearing is mandatory."