issue with type check solved