Fixed nasty compiler bug