Type checking error fixed