some bug fixes, ... forgot what though