inital javascript error in console fixed