Fixed errort in apoggee code