Fixes after david's comments