added debug messages, fixed bug with boolean field values