This should be converted to a boolean and not continually compared to 'true' or 'false'