Fix SQLException Bug