fixed JS crash in Uniform directive