Bug fix

Fixed a big that arose due to API changes