some minor changes fixed