Implemented sorting on warnings