fixed a bug, where the application crashed.