mistake fixed
bugfix
slight code improvements