Hacked in a fix( pretty sure it's incomplete)