fixed further bugs