System.sleep(uint16_t wakeUpPin, uint16_t edgeTriggerMode, long seconds) fails timed wakeup(SOLVED)

I’m finding that System.sleep(D3, RISING, 5); in SEMI_AUTOMATIC mode wakes up fine on RISING but not at all otherwise (5 seconds). I’ve compiled locally on develop, latest and photon_043 all to no avail. Is the timed wakeup broken or am I missing something?
EDIT: I can’t figure out what I did wrong earlier but it’s working fine on develop branch now.