bug fixes for deploy script