fixes crash issue when there is no pre-loaded data .
cleaning up
Merge pull request #12 from MoathOthman/master

crash issue