Fix wrong resource being used for before and require