fixed minor bugs4