bugfix & typecheck in unary operation