Fixed performance and sorting of resource proposals.

Change-Id: I21246574be6342383ed1d622398672a7e47f2db4