Fix #750

@garyb @jutaro Please review, thanks.