Modify deploy function.