database & GUI fixs