Fixed warnings and crashers