fixes for rails integration