fixed issues using wrong data