Bug fix for unassigning applications