goto ftw + some fixes