Fix sorting of sprites
Sort function for sprite array was not implemented correctly, creating an incorrect sorting of the sprites.
Merge pull request #15 from egeriis/sort-fix

Fix sorting of sprites