Updated to fix access bug