Fix rename bundle on Mac

Closes #960.