fix "Expression type mismatch" error in IDEA