[Bugfix] fixed NPE due to accessing fields instead of parameter