Merge bug fixes