Added status checking for spoj