complete version with mouse wheel bug