fixed bug in loading data back in from mysql