Fixes to get layer working on dylan

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>