Fixing Pi bugs