Issue#359

Fixed functional and simple brackets, tests for issue#359.