Fixed some sort errors and static method calls