Fixed some dumb bugs that shouldn't have been commited