Corrected a small side effect bug