Fixed a runWriteAction.
Fixed not resolving type parameter correctly.