fixed some problems. Hopefully.