Fixed some more logic