fixing problem with hitting ceiling