fixed big bug due to uninitialized inputs
merging input fix into master