minor bugfix delete method did not clear selectedRecord.