fixed error appearing in console