Fixed one or two more bugs