Fixed API lookup + other fixes