fixed some type issues