Fix bug when returning from action