Fix patch bug

See https://www.pivotaltracker.com/story/show/66262856