improved typeerrors