Fixed problems with fields types + some other some changes