fixed bug with setting default value to 0 or false, and added example