Fix patch loading
Fix Rails 3 compat