Fixed some more edge cases