tests run in correct order; fix asynchronous bug