solving minor bugs