Sort and resize fix for Linux