Attempting to fix activerecord bug