bugfix and more tests for functional core