curses and engine bugfixes