Fixes for mysql, perl