Bug fix for single self loops

For a sole self loop the dimension weren't correct.