fixes an uggly bug