fix layer not refreshing