fixing js problem