Solved display issues by changing dimension variables from int to double