offset rule not working correctly