fixed getting info from db