Fixed mouse coordinate calculations