some bug fixes and changed license