fixed stupid sql bullshit