bugfix and add tests