Added test
Bugfixes