Fix for issue #1, a bit workaround-ish but probably okay