fix javascript validation error