Added correct handling of $memwr priority