fixes thanks to @WouterJ