Fixed double type check