Fixed bad bad code