bug fix: layer hiding didn't work