Fix for null layout