Fixes to stupid mistakes in last commit