Fixed bug with type methods and fields