Updated to avoid the Rails bug