Fixed some bugs and added new version of shadowAPI2