make fields final
fix wrong "if" expression