Fix small handling issues