fixed bug with SP.notReady