fix / enhance behaviour when using custom viewport