Fix issue #294 -- Error in sortActual when data is replaced
Merge pull request #297 from tcrimi/master

Fix for issue #294