Weird type error