Bug fix of Scheduling SPMAPT and HPTASKS