fix static method calls and fix masking for them