fixed unsafe stuff