Cleanup
Fixed bug with resources