merged hamza's quick padding fix