Credit to japh for last commit