Trying to fix #555 (untested)