Update bug fix for mysql database