Fixed stability issues and extended to two neurons