fixed boolean comparison issues
fixed attribute access error