some xpm fixes