Fixed previous stack overflow error