Update for latest core. Probably still buggy.