Fixed bug of when having no dimensions

(needs to be improved)