Added ReplaceEntity action.
Fixed small bug in ElementButton.