Fixes issue #147. (Correctly this time)