fixed bug with refresh_from_db