Merge bug fix from master