Fixes .when attribute