Changed booleans to query outside of strings for PG