Added checks on change to alpha state to avoid infinite loops