Fixed current warnings/crashes