Stupid bug when ending task