Fix some code for terracotta using Jobmanager bundle