Fixed some issues found in real world testing