Fix/clean up resources