fixed long type checking