some bug fixes :)