Fix as suggested on github