fixed bug: caption not centering correctly. fixed problem in other alignment functions as well