fix variable of mega

"declare -i mega " position changed.