core: oops, math fail, thanks @bennybennet