Testing and fixes