fixing a few memory leaks, todo: check for the bloc_t element allocation in creating surface (not freed)