Fixed Leif's code :)