controller invoke twice fix