fixed currentlayer bug