Changes to comply with new API