Fixed some unexpected issues