Added support for rests.