Change previous error with @when in keys test