Fixed a bug that cause the inputs notto update