Bug fix

This rolls back to commit 9dbbef6ee894d5f12905e68eea4aded10dfd4fa4.