Changed select return values check