fixed minor bugs
more bug fixes