Fixed the bugs (for now)