Fixed bug with contexts