swap bug fixed, loging