fix to handle changed api