Fixed nasty bug