Fix syntax issues with the original pull request.
Make ratio between width and height configurable