fixed crash in sdome xponen code
and fixed possible issue for linux