This has always been wrong, and remained unnoticed. Also added a typehint for added safety. Change-Id: I8a3c31e7385283d95b4712d457784016239a0b3b