Fixed a bug in JModelList and added tests for populateState