bug fix for issues