fix warnings and layouts