Weird. Just as a test, change the command to df -m $1 | tail -1 | awk ' { print $4 } ' with -m you get the megabytes directly. I suspect int() may be doing something weird.