The bug has been fixed; I simply made the walls push the player if they detect that they are inside the walls.