Improve support of older Rails version
Fix loading issues