Small fixings to avoid database error