fixed another stupid bug which caused more segfaults pfft