fix notices and strict warnings in task module