resetting operation_actions for media operations
better handling of existing media
- php was probably resetting the array pointer and foreach was not liking it