Updates to try and fix memory issues