Fixed: don't do calculations when layers are off