update layer issues #108 and #107