This was one hell of a stupid bug