Updated to hopefully stop crashing