Fixed migration issues and item api