possible fix for access violation