Fix logging and selection issues