Change method for obtaining overlay width & height. Fixes #317