fixed bugs from last commit...