fixed some serious issues