Crappy fix for rails