Fixed js compile errors