fixing the grabbing from database and updating accordingly.