code added in application rb to prevent pg error