resolves #290 safe mode set using string, symbol or int

- this change makes safe mode resolution a lot more robust