fix potential problems