merging bug fix from master branch
finished merged bug fix from master