project: cast width and height when they are set through properties.