fix incorrect comparison on variable intialization type