Fixed issue with modal. Removed dup code.