Fixed context issue and missing break statement