Minor java script bug