Fix for javascript error from old prototype version