Fix for bug that shows up with activerecord.