Bug fixes if lookup fields

Fixes #37
Fixes minor bugs related to looupfields update