tried to fix loading problem by putting everything in setInit in an additional callback