Changes to make it work with refactored F7