Fixed bug in sapos