fixed small edgecasase bug