fixed bugs, no more console errors