Added safe apply for #27