fix mastery JS validation