Removed a redundant query. Code changes for boolean field.