Ensure functions run sequence