fix various cases where layout trig could fail
sign errors