Fixes issue mentioned by @gabormeszoly #1363