Partial fix of layertile problem #67.