Fix build and deploy tasks