STORM-613: Fix wrong getOffset return value

When judge getOffset return value, use 0 not NO_OFFSET as invalid offset return value.