fixes to types plugin - close #530