Fixing bugs from compile attempt