Some fixes, stat not working yet