more bug fixes, quite smooth now