Fixed issues with internal representation