Merged some updates

Merged some updates from few forks.