Bugfix

Suggestion fixing all two opened bugs.