fixed issue with application loading

qt5 has different behaviour and the instance of core application must be created before anything else