added fixes for incomplete input