fix type issues