fixes GH#1 as @SwedFTP proposed