Urgent bug fix on reading from database