Fixed bug that was messing everything up