bugfix & corrections