Fixes from bjorns review