fixed minor bugs such as typeId.equals