Changed definition of 'stability' variable slightly. Change only effects unstable phases