Bug in the base layer setting function fixed.