[scripts] fix bug in common.sh