Fix stack overflow exception

@aaustin