modified the observer's bug that occurred in IE and chrome
made all double values to int values