Minor changes.
Added check for vout.