deploy script bug fixing