fixing some stuff after big refactor