Fixes for mysq, perl