fixed renderInputView function in gallery view