fixed alignment in generated table, added test