diff --git a/impls/basic/Dockerfile b/impls/basic/Dockerfile
index 928b1b1c62..026045e1f0 100644
--- a/impls/basic/Dockerfile
+++ b/impls/basic/Dockerfile
@@ -1,4 +1,4 @@
-FROM ubuntu:wily
+FROM ubuntu:24.04
 MAINTAINER Joel Martin <github@martintribe.org>
 
 ##########################################################
@@ -9,10 +9,8 @@ MAINTAINER Joel Martin <github@martintribe.org>
 RUN apt-get -y update
 
 # Required for running tests
-RUN apt-get -y install make python
-
-# Some typical implementation and test requirements
-RUN apt-get -y install curl libreadline-dev libedit-dev
+RUN apt-get -y install make python3
+RUN ln -fs /usr/bin/python3 /usr/local/bin/python
 
 RUN mkdir -p /mal
 WORKDIR /mal
@@ -21,18 +19,22 @@ WORKDIR /mal
 # Specific implementation requirements
 ##########################################################
 
+RUN DEBIAN_FRONTEND=noninteractive apt-get -y install \
+    ca-certificates curl gcc g++ libasound2-dev \
+    libglu1-mesa-dev mesa-common-dev patch unzip wget
+
 # cbmbasic
-RUN apt-get install -y gcc unzip patch
+# Remove duplicate RAM (https://github.com/mist64/cbmbasic/commit/352a313313dd0a15a47288c8f8031b54ac8c92a2).
 RUN cd /tmp && \
     curl -L https://github.com/kanaka/cbmbasic/archive/master.zip -o cbmbasic.zip && \
     unzip cbmbasic.zip && \
     cd cbmbasic-master && \
+    sed -i '/unsigned char RAM.65536.;/d' runtime.c && \
     make && \
-    cp cbmbasic /usr/bin/cbmbasic && \
+    mv cbmbasic /usr/local/bin && \
     cd .. && \
     rm -r cbmbasic*
 
-RUN apt-get install -y g++ mesa-common-dev libglu1-mesa-dev libasound2-dev wget
 RUN cd /tmp && \
     curl -L http://www.qb64.net/release/official/2017_02_09__02_14_38-1.1-20170120.51/linux/qb64-1.1-20170120.51-lnx.tar.gz | tar xzf - && \
     cd qb64 && \
@@ -42,5 +44,3 @@ RUN cd /tmp && \
     cp -a qb64 internal LICENSE programs source /usr/share/qb64/ && \
     echo '#!/bin/sh\ncd /usr/share/qb64\n./qb64 "${@}"' > /usr/bin/qb64 && \
     chmod +x /usr/bin/qb64
-
-
diff --git a/impls/basic/basicpp.py b/impls/basic/basicpp.py
index cb2f6223f8..c9c64df363 100755
--- a/impls/basic/basicpp.py
+++ b/impls/basic/basicpp.py
@@ -111,7 +111,7 @@ def misc_fixups(orig_lines):
     text = re.sub(r"\bIF ", "IF", text)
     text = re.sub(r"\bPRINT *", "PRINT", text)
     text = re.sub(r"\bDIM ", "DIM", text)
-    text = re.sub(r"\OPEN ", "OPEN", text)
+    text = re.sub(r"\bOPEN ", "OPEN", text)
     text = re.sub(r"\bGET ", "GET", text)
     text = re.sub(r"\bPOKE ", "POKE", text)
     text = re.sub(r"\bCLOSE ", "CLOSE", text)
@@ -161,7 +161,7 @@ def finalize(lines, args):
         if m:
             prefix = m.groups(1)[0]
             sub = m.groups(1)[1]
-            if not call_index.has_key(sub):
+            if sub not in call_index:
                 call_index[sub] = 0
             call_index[sub] += 1
             label = sub+"_"+str(call_index[sub])