Workaround rails bug