fixed bug with hstack and added test to check it