Adding serialization method to avoid serializing the controller and the method. This is a temporary workaround.