Fixing bugs caused by partial port to new API
Fixing bugs caused by partial port to new API