Fix up deploy and rebuild