fixed issue with unexpected type