Fixed a few datatype comparison problems