Fixes Null Reference Exception