Crash after adding new libraries

- fixed test application
- refactoring