Fixed a bug on priority