Bug Fix

Need to check typeof dev_mode rather than true/false as variable can be
false but still exists