Some minor correction

These corrections should be merged to the master. Don't merge the new
functions, delete them. They will be rewritten.