added fix for viewport