Static bug fixes