Fixed bug in dblayer