Fixed weird bug - not sure how