Fix issue when compiling multiple tasks