xpm reading fixes