Fixed stuff after all the refactoring from yesterday