fix arguments in when method