fixed bug in mysql fetch in databasemodel