Fixed small bug in assigning default values