Fix a bug in MainPlacingTask.java