fix JavaScript warnings